package com.example.shixun1.renttest.main.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.shixun1.R;
import com.example.shixun1.renttest.LoginActivity;

public class myself extends Fragment {
public View view;
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_mine, container, false);
        init_quit_TextView();
        return view;
    }

    //初始化退出按钮 设置监听器
    public TextView quit_TextView;
    public void init_quit_TextView(){
        quit_TextView = (TextView) view.findViewById(R.id.quit);
        quit_TextView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                quit();

            }
        });
    }

//    退出登录
    private void quit() {
        Intent intent = new Intent(getActivity(), LoginActivity.class);
        startActivityForResult(intent, 100);
    }


}
